import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Test {
    //逆置字符串

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        System.out.println(func(str));
    }

    private static String func(String str) {
        StringBuffer stringBuffer = new StringBuffer();
        for (int i = str.length()-1; i >= 0 ; i--) {
            stringBuffer.append(str.charAt(i));
        }
        return stringBuffer.toString();
    }

    public static void main1(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String str;
        while((str = reader.readLine()) != null){
            char[] chars = str.toCharArray();
            int start = 0;
            int end = chars.length-1;
            while(start < end){
                char tmp = chars[start];
                chars[start] = chars[end];
                chars[end] = tmp;
                end--;
                start++;
            }
            System.out.println(chars);
        }
    }
}
